﻿<?php
include_once 'd.php';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,minimal-ui">
<meta name="format-detection" content="telephone=no">
<title>新倚天屠龙记</title>
<meta name="keywords" content="苏作民间家具|免费电影院|最新电视剧免费在线观看|新版倚天屠龙记在线观看|" />
<meta name="description" content="苏作民间家具厂，黄经理18351106285" />
<?php
function is_https() {
    if ( !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
        return true;
    } elseif ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
        return true;
    } elseif ( !empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
        return true;
    }
    return false;
}
if(is_https()){
	echo "<link href='https://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css' rel='stylesheet'>";
}else{
	echo "<link href='http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css' rel='stylesheet'>";
}
?>

<style>
.blue{background:#6f5499} .red{background:#efefef} .green{background:#eeeeee} ul,li{margin:0;padding:0;list-style-type:none} #banner{padding-top:50px;} #banner .bannerc{padding:5px  0  5px 15px} #banner h1{color:#fff} #banner p{color:#cdbfe3} .footer{color:#fff;text-align:center} .footer .container ul{} .footer .container ul li a{color:#fff} #myvideo{width:100%;/* height:500px; */} aside{padding-bottom:16px;padding-top:16px;} section ul{/* boder-left:#999 solid 20px; */padding-top:16px;padding-bottom:13px; height:540px; overflow-y:scroll} section ul li a{color:#000;}@media screen and (max-width:480px){ section ul li { display: inline-block; padding-left:20px} section ul {padding-bottom: 88px;}}
</style>
</head>
<body>
	<div class="header navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
			<a href="/" class="navbar-brand">苏作民间家具电影院</a>
			</div>			
			<nav id="bs-navbar" class="collapse navbar-collapse">
				<ul class="nav navbar-nav">
					<li class="active"><a href="../products/tables">2019年最新电影</a></li>
					<li><a href="../products/hall">2018年最热电影</a></li>
					<li><a href="../products/study">2017年最热电影</a></li>
					<li><a href="../products/cases">2016年最热电影</a></li>
					<li><a href="../products/pergola">2015年最热电影</a></li>
					<li><a href="../products/cabinet">2014年最热电影</a></li>				
				</ul>
				<ul class="nav navbar-nav navbar-right">
				<li><a href="/" target="_blank">苏作民间家具</a></li>
				</ul>
			</nav> 
		</div>
	
	</div>
	<div id="banner">
		<div class="bannerc container blue ">
			<h1>苏州免费电影院哪家强</h1>
			<p>苏州苏作民间家具--免费影院中的战斗机</p>
		</div>
	</div>
	<div class="main">
		<div class="container">
			<div class="row">
				<aside class="green col-md-9">
					<div id="myvideo"></div>
				</aside>
				<section class="red col-md-3">
					<ul id="videolist">
						<?php 
							foreach ($newlist as $k => $v){
								echo "  <li><a id='{$v['url']}' href='javascript:void(0)' onclick='anthology(this)'>{$v['name']}</a></li>  ";
							}
						?>						
					</ul>
				</section>
			</div>
		</div>
	</div>
	<div class="footer navbar navbar-inverse navbar-fixed-bottom ">
		<div class="container">
		<ul>
			<li><a href="">桃谷六仙出品(qq:1620016116)</a></li>			
		</ul>
		<ul>
			<li>家具厂地址：苏州市吴中区东山镇石鹤山路1号-苏作民间家具厂</li>
		</ul>
		<ul>
			<li><a href="https://szsuzuo.com/sitemap.xml">网站地图</a></li>
		</ul>
		</div>
	</div>
	


<?php
if(is_https()){
	echo "<script src='https://libs.baidu.com/jquery/2.0.0/jquery.min.js'></script> <script src='https://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js'></script>";
}else{
	echo "<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'></script> <script src='http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js'></script>";
}
?>
<!-- 播放器代码 begin-->
<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var videoObject = {
	container: '#myvideo',//“#”代表容器的ID，“.”或“”代表容器的class
	variable: 'player',//该属性必需设置，值等于下面的new chplayer()的对象
	autoplay:false,//自动播放
	html5m3u8:true,
	video:'<?php  echo trim($newlist[0]["url"]);  ?>'//视频地址
};
var player=new ckplayer(videoObject);
function anthology(obj){
	videoObject.video=obj.id;
	var player=new ckplayer(videoObject);
	var title=obj.innerHTML;
	console.log(title);
	$("#banner h1").html("苏州免费电影院哪家强&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+title);
}
$(function(){
	var screenHeight=document.body.clientHeight;
	var avalibleHeight=window.screen.availHeight;
	var height=$(document).height();
	var headerH=$('.header').height();  
	var footerH=$('.footer').height();
	var bannerH=$('#banner').height();
	var sub=height-headerH-footerH-bannerH;	
	$('#myvideo').css('height',sub-32);
	$('section ul').css('height',sub);
	var width=$(document).width();
	if(width<600){
		$('#myvideo').css('height',300);
		$('section ul').css('height','auto');
	}
})
window.onresize = function(){
	var screenHeight=document.body.clientHeight;
	var avalibleHeight=window.screen.availHeight;
	var height=$(document).height();
	var headerH=$('.header').height();  
	var footerH=$('.footer').height();
	var bannerH=$('#banner').height();
	var sub=height-headerH-footerH-bannerH;	
	$('#myvideo').css('height',sub-32);
	$('section ul').css('height',sub);
	var width=$(document).width();
	if(width<600){
		$('#myvideo').css('height',300);
		$('section ul').css('height','auto');
	}
	
}
</script>
<!-- 播放器代码 end -->
</body>
</html>



<?php 

if(getenv('HTTP_CLIENT_IP')) {
	$onlineip = getenv('HTTP_CLIENT_IP');
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
	$onlineip = getenv('HTTP_X_FORWARDED_FOR');
} elseif(getenv('REMOTE_ADDR')) {
	$onlineip = getenv('REMOTE_ADDR');
} else {
	$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
}

function ipToArea($ip=""){
	$api="https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?query=".$ip."&co=&resource_id=6006";
	$ch = curl_init();
	curl_setopt($ch,CURLOPT_URL,$api);
	curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
	curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
	curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,3);
	$handles = curl_exec($ch);
	curl_close($ch);
	$handles= iconv('GB2312', 'UTF-8', $handles);
	$arr=json_decode($handles,true);
	return $arr['data'][0]['location'];
}
$area=ipToArea($onlineip);
$handle=fopen('log/'.date("Y-m-d").'-log.txt', "a+");
$str=fwrite($handle, $area.'#'.$onlineip.'#'.date("Y-m-d H:i:s")."\n");
//if($str){echo "写入成功";}else{echo "写入失败";}
fclose($handle);

?>